package com.smallx.xpath;

import org.infoset.xml.XMLException;

/**
 * This exception is thrown from the next() method of a java.util.Iteration
 * instance returned as a result of evaluating some XPath expression.  It is
 * a wrapper for the XPath dynamic error contained by this exception and the
 * real error that occurred.
 * @author  R. Alexaner Milowski
 */
public class XPathDynamicIterationError extends java.lang.RuntimeException {

   XMLException error;
   
   /**
    * Creates a new instance of <code>XPathDynamicIterationError</code> without detail message.
    * @param ex The dynamic error exception
    */
   public XPathDynamicIterationError(XMLException ex) {
      this.error = ex;
   }

   /**
    * Returns the dynamic error that occurred during iteration.
    */
   public XMLException getError() {
      return error;
   }
}
